package com.xxja.order.utils.exception;

import lombok.ToString;

@ToString
public enum ExceptionCode implements ResultCode {
    NULL_EXCEPTION(false, 11000, "空"),
    USER_USERNAME_NONE(false, 11001, "请输入用户名"),
    USER_PASSWORD_NONE(false, 11002, "请输入密码"),
    USER_NOTPASSWORD_NOTUSERNAME(false, 11003, "输入用户名不存在！重新输入"),
    USER_USERNAME_EXIST(false, 11004, "输入的姓名已存在，请重新输入"),
    SHOP_NONE(false, 11005, "没有商品店铺信息"),
    USER_NOT_LOGIN(false, 11006, "用户没有登录"),
    SHOP_ID_NONE(false, 11007, "店铺信息主键没传给后台"),
    ORDER_NOT_FOUND(false, 11008, "不存在此订单，或者输入订单号错误"),
    ORDER_USER_NOTFOUND(false, 11009, "您还没有订单，赶快去购物吧！"),
    ORDER_UPDATE_STATUS(false, 11010, "订单状态更改失败！");
    private ExceptionCode(boolean success, int code, String message){
        this.success = success;
        this.code = code;
        this.message = message;
    }
    boolean success;
    int code;
    String message;
    @Override
    public boolean success() {
        return success;
    }

    @Override
    public int code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }
}
